package com.xmy.cultivate.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.xmy.cultivate.entity.SenateDepart;
import com.xmy.cultivate.entity.StaffStatusCount;
import com.xmy.cultivate.service.ISenateDepartService;
import com.xmy.cultivate.util.Code;
import com.xmy.cultivate.util.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;
import java.util.List;

/**
 * <p>
 * 积分部门 前端控制器
 * </p>
 *
 * @author hpiggy
 * @since 2025-04-17
 */
@RestController
@RequestMapping("/api/senateDepart")
public class SenateDepartController {

    @Autowired
    ISenateDepartService iSenateDepartService;

    @GetMapping("")
    @ApiOperation("积分部门列表")
    public Result getSenateDepartList() {

        List<SenateDepart> senateDepartList = iSenateDepartService.list(new QueryWrapper<SenateDepart>().eq("status", 1));

        return new Result(Code.OK, senateDepartList, Code.GET_OK_MSG);
    }

}
